3.4.97 \(\int \frac {(d+e x)^2 (a+b x^2)^p}{x^2} \, dx\) [397]

Optimal. Leaf size=127 \[ -\frac {d^2 \left (a+b x^2\right )^{1+p}}{a x}+\frac {\left (a e^2+b d^2 (1+2 p)\right ) x \left (a+b x^2\right )^p \left (1+\frac {b x^2}{a}\right )^{-p} \, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {b x^2}{a}\right )}{a}-\frac {d e \left (a+b x^2\right )^{1+p} \, _2F_1\left (1,1+p;2+p;1+\frac {b x^2}{a}\right )}{a (1+p)} \]

[Out]

-d^2*(b*x^2+a)^(1+p)/a/x+(a*e^2+b*d^2*(1+2*p))*x*(b*x^2+a)^p*hypergeom([1/2, -p],[3/2],-b*x^2/a)/a/((1+b*x^2/a
)^p)-d*e*(b*x^2+a)^(1+p)*hypergeom([1, 1+p],[2+p],1+b*x^2/a)/a/(1+p)

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {1821, 778, 272, 67, 252, 251} \begin {gather*} \frac {x \left (a+b x^2\right )^p \left (\frac {b x^2}{a}+1\right )^{-p} \left (a e^2+b d^2 (2 p+1)\right ) \, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {b x^2}{a}\right )}{a}-\frac {d^2 \left (a+b x^2\right )^{p+1}}{a x}-\frac {d e \left (a+b x^2\right )^{p+1} \, _2F_1\left (1,p+1;p+2;\frac {b x^2}{a}+1\right )}{a (p+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(a + b*x^2)^p)/x^2,x]

[Out]

-((d^2*(a + b*x^2)^(1 + p))/(a*x)) + ((a*e^2 + b*d^2*(1 + 2*p))*x*(a + b*x^2)^p*Hypergeometric2F1[1/2, -p, 3/2
, -((b*x^2)/a)])/(a*(1 + (b*x^2)/a)^p) - (d*e*(a + b*x^2)^(1 + p)*Hypergeometric2F1[1, 1 + p, 2 + p, 1 + (b*x^
2)/a])/(a*(1 + p))

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))
*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Intege
rQ[m] || GtQ[-d/(b*c), 0])

Rule 251

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 252

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^FracPart[p]/(1 + b*(x^n/a))^Fra
cPart[p]), Int[(1 + b*(x^n/a))^p, x], x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILt
Q[Simplify[1/n + p], 0] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 778

Int[(x_)^(m_.)*((f_) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[f, Int[x^m*(a + c*x^2)^p, x]
, x] + Dist[g, Int[x^(m + 1)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, f, g, p}, x] && IntegerQ[m] &&  !IntegerQ[2
*p]

Rule 1821

Int[(Pq_)*((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, c*x, x],
 R = PolynomialRemainder[Pq, c*x, x]}, Simp[R*(c*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] + Dist[1/(
a*c*(m + 1)), Int[(c*x)^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*c*(m + 1)*Q - b*R*(m + 2*p + 3)*x, x], x], x]] /;
FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && LtQ[m, -1] && (IntegerQ[2*p] || NeQ[Expon[Pq, x], 1])

Rubi steps

\begin {align*} \int \frac {(d+e x)^2 \left (a+b x^2\right )^p}{x^2} \, dx &=-\frac {d^2 \left (a+b x^2\right )^{1+p}}{a x}-\frac {\int \frac {\left (-2 a d e-\left (a e^2+b d^2 (1+2 p)\right ) x\right ) \left (a+b x^2\right )^p}{x} \, dx}{a}\\ &=-\frac {d^2 \left (a+b x^2\right )^{1+p}}{a x}+(2 d e) \int \frac {\left (a+b x^2\right )^p}{x} \, dx+\frac {\left (a e^2+b d^2 (1+2 p)\right ) \int \left (a+b x^2\right )^p \, dx}{a}\\ &=-\frac {d^2 \left (a+b x^2\right )^{1+p}}{a x}+(d e) \text {Subst}\left (\int \frac {(a+b x)^p}{x} \, dx,x,x^2\right )+\frac {\left (\left (a e^2+b d^2 (1+2 p)\right ) \left (a+b x^2\right )^p \left (1+\frac {b x^2}{a}\right )^{-p}\right ) \int \left (1+\frac {b x^2}{a}\right )^p \, dx}{a}\\ &=-\frac {d^2 \left (a+b x^2\right )^{1+p}}{a x}+\frac {\left (a e^2+b d^2 (1+2 p)\right ) x \left (a+b x^2\right )^p \left (1+\frac {b x^2}{a}\right )^{-p} \, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {b x^2}{a}\right )}{a}-\frac {d e \left (a+b x^2\right )^{1+p} \, _2F_1\left (1,1+p;2+p;1+\frac {b x^2}{a}\right )}{a (1+p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.21, size = 134, normalized size = 1.06 \begin {gather*} -\frac {\left (a+b x^2\right )^p \left (1+\frac {b x^2}{a}\right )^{-p} \left (a d^2 (1+p) \, _2F_1\left (-\frac {1}{2},-p;\frac {1}{2};-\frac {b x^2}{a}\right )+e x \left (-a e (1+p) x \, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {b x^2}{a}\right )+d \left (a+b x^2\right ) \left (1+\frac {b x^2}{a}\right )^p \, _2F_1\left (1,1+p;2+p;1+\frac {b x^2}{a}\right )\right )\right )}{a (1+p) x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(a + b*x^2)^p)/x^2,x]

[Out]

-(((a + b*x^2)^p*(a*d^2*(1 + p)*Hypergeometric2F1[-1/2, -p, 1/2, -((b*x^2)/a)] + e*x*(-(a*e*(1 + p)*x*Hypergeo
metric2F1[1/2, -p, 3/2, -((b*x^2)/a)]) + d*(a + b*x^2)*(1 + (b*x^2)/a)^p*Hypergeometric2F1[1, 1 + p, 2 + p, 1
+ (b*x^2)/a])))/(a*(1 + p)*x*(1 + (b*x^2)/a)^p))

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\left (e x +d \right )^{2} \left (b \,x^{2}+a \right )^{p}}{x^{2}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(b*x^2+a)^p/x^2,x)

[Out]

int((e*x+d)^2*(b*x^2+a)^p/x^2,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(b*x^2+a)^p/x^2,x, algorithm="maxima")

[Out]

integrate((x*e + d)^2*(b*x^2 + a)^p/x^2, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(b*x^2+a)^p/x^2,x, algorithm="fricas")

[Out]

integral((x^2*e^2 + 2*d*x*e + d^2)*(b*x^2 + a)^p/x^2, x)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 5.39, size = 95, normalized size = 0.75 \begin {gather*} - \frac {a^{p} d^{2} {{}_{2}F_{1}\left (\begin {matrix} - \frac {1}{2}, - p \\ \frac {1}{2} \end {matrix}\middle | {\frac {b x^{2} e^{i \pi }}{a}} \right )}}{x} + a^{p} e^{2} x {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, - p \\ \frac {3}{2} \end {matrix}\middle | {\frac {b x^{2} e^{i \pi }}{a}} \right )} - \frac {b^{p} d e x^{2 p} \Gamma \left (- p\right ) {{}_{2}F_{1}\left (\begin {matrix} - p, - p \\ 1 - p \end {matrix}\middle | {\frac {a e^{i \pi }}{b x^{2}}} \right )}}{\Gamma \left (1 - p\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(b*x**2+a)**p/x**2,x)

[Out]

-a**p*d**2*hyper((-1/2, -p), (1/2,), b*x**2*exp_polar(I*pi)/a)/x + a**p*e**2*x*hyper((1/2, -p), (3/2,), b*x**2
*exp_polar(I*pi)/a) - b**p*d*e*x**(2*p)*gamma(-p)*hyper((-p, -p), (1 - p,), a*exp_polar(I*pi)/(b*x**2))/gamma(
1 - p)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(b*x^2+a)^p/x^2,x, algorithm="giac")

[Out]

integrate((x*e + d)^2*(b*x^2 + a)^p/x^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (b\,x^2+a\right )}^p\,{\left (d+e\,x\right )}^2}{x^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*x^2)^p*(d + e*x)^2)/x^2,x)

[Out]

int(((a + b*x^2)^p*(d + e*x)^2)/x^2, x)

________________________________________________________________________________________